# -*- coding: utf-8 -*-
"""
Created on Thu Oct 22 18:05:11 2020

@author: Administrator
"""

class Stack(object):
    
    #初始化
    def __init__(self):
        self.__items=[]      
      
     #压栈   
    def push(self,v):
        self.__items.append(v)
     #出栈  
    def pop(self):
        return self.__items.pop()
    
    #栈是否为空
    def isEmpty(self):
        return self.__items==[]
    
    #转字符
    def __str__(self):
        return str(self.__items)
    
    #求长度
    def __len__(self):
        return len(self.__items)
    
    
    
s=Stack()
s.push(1)
s.push(2)

print(s)